<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddAddressToUsers extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->string('address')->nullable()->comment('联系地址');
            $table->string('check_status')->nullable()->comment('审核状态');
            $table->string('login_ip')->nullable()->comment('最近登录 IP');
            $table->string('login_time')->nullable()->comment('最近登录时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn('address');
            $table->dropColumn('check_status');
            $table->dropColumn('login_ip');
            $table->dropColumn('login_time');
        });
    }
}
